<include file="Public:head" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="__APP__/Application/{$Think.MODULE_NAME}/Public/css/cart.css"/>
<script src="__APP__/Application/{$Think.MODULE_NAME}/Public/js/payorder.js" type="text/javascript"></script>
<div id="wrap" style="width:860px;">
    <empty name="cartsArr">
    <div id="order" class="shadow">
<div id="empty">
<h2>您的美食篮还是空的，赶紧行动吧！您可以：</h2>
<ul style="margin-top: 12px">
<li>
马上去
<a href="/meal/Area/lists/id/3.html" style="color: #55ACDC">购买</a>
</li>
<li style="padding-top: 4px">
看看
<a href="/meal/Member/order.html" style="color: #55ACDC">已买到的美食</a>
</li>
</ul>
</div>
</div>
        <else/>
    <div class="cart_menu">
        <div class="cart_menu_left">
            <strong style="color:#FF4400;font-size: 16px;">
                全部美食
                <span style="font-weight: normal" class="cart_num">{$cart_num}</span>
            </strong>
        </div>
        <div class="cart_menu_right">
            已选美食：
            <strong style="color:#FF4400"class="cart_price_total">¥ 0.0</strong>
            <a type="button" class="submit-btn-small submit-btn-disabled btn_check" onclick="btn_cart_submit($(this))">结 算</a>
        </div>
        <div class="cl"></div>
    </div>
    <form name="form_cart" action="{:U('Cart/confirm')}" method="POST">
    <div id="cart_area" class="cart-main">
        <div class="cart-table-th">
            <div class="wp">
                <div class="th th-chk">
                    <label><input type="checkbox" class="checkbox check_cart" onclick="check_cart($(this))" autocomplete="off"/> 全选</label>
                </div>
                <div class="th th-item">美食</div>
                <div class="th th-price">单价（元）</div>
                <div class="th th-amount">数量</div>
                <div class="th th-sum">金额（元）</div>
                <div class="th th-op">操作</div>
            </div>
        </div>
        <foreach name="cartsArr" item="row">
            <div class="c_shop" style="margin:20px 0">
                <input type="checkbox" class="checkbox check_shop" value="{$row.id}" autocomplete="off" onclick="check_shop($(this))"/> 
                <span class="label label-danger tt">{$row.name}</span>
            </div>
            <div class="order-content">
                <foreach name="row['sub']" item="row2">
                    <div  class="bundle">
                        <ul class="item-content clearfix">
                            <li class="td td-chk">
                                <input  class="check_goods" type="checkbox" value="{$row2.id}" name="id[]" autocomplete="off" onclick="check_goods($(this))"/>
                            </li>
                            <li class="td td-item">{$row2.name}</li>
                            <li class="td td-price">{$row2['price']-$row2['discount']|getOneDot=###}</li>
                            <li class="td td-amount">
                                <div class="item-amount ">
                                    <a class="J_Minus no-minus" onclick="cart_goods_minus($(this))">-</a>
                                    <input class="text text-amount J_ItemAmount" name="num[]" type="text" autocomplete="off"  value="{$row2.num}">
                                    <a class="J_Plus plus" onclick="cart_goods_plus($(this))">+</a>
                                </div>
                            </li>
                            <li class="td td-sum">
                                <strong style="color:#FF4400">{$row2['price_total']|getOneDot=###}</strong>
                            </li>
                            <li class="td td-op">
                                <a class="btn-fav J_Fav J_MakePoint" onclick="addToCollect('{$row2.id}',1)" title="移至收藏夹">移至收藏夹</a>
                                <a class="J_Del J_MakePoint" style="margin-left: 6px;" onclick="cart_goods_del($(this))">删除</a>
                            </li>
                            <div class="cl"></div>
                        </ul>
                    </div>
                </foreach>
            </div>
        </foreach>
        <div id="J_FloatBarHolder" class="float-bar-wrapper">
            <div style="float:left">
                <label><input type="checkbox" class="checkbox check_cart" onclick="check_cart($(this))" autocomplete="off"/> 全选</label>
                <a style="margin-left: 60px">删除</a>
                <a style="margin:0 0 0 15px">移入收藏夹</a>
            </div>
            <div style="float:right">
                已选美食
                <strong style="margin:0 2px;color:#f40" id="cart_num_chose">0</strong>
                份
                合计：
                <strong class="submit_price">¥ <span class="cart_price_total">0.0</span></strong>
                <a  class="submit-btn submit-btn-disabled btn_check" onclick="btn_cart_submit($(this))">
                    结 算
                </a>
            </div>
            <div class="cl"></div>
        </div>
    </div>
        </form>
        </empty>
</div>
<include file="Public:foot" />